<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div class="skip" id="skip"></div>
</body>
<script>
    var oBox = document.getElementById('skip');

    // function hasEle(ele, cls) {
    //     return ele.className == cls;
    // }

    function hasEle(ele, cls) {
        var clsName = ele.className;
        return clsName == cls;
    }


    console.log(hasEle(oBox, 'skip'))



</script>
</html>